package com.wkq.database.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.wkq.database.dao.VoaUserInfo;
import com.wkq.database.dao.VoaWordInfo;

import com.wkq.database.dao.VoaUserInfoDao;
import com.wkq.database.dao.VoaWordInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig voaUserInfoDaoConfig;
    private final DaoConfig voaWordInfoDaoConfig;

    private final VoaUserInfoDao voaUserInfoDao;
    private final VoaWordInfoDao voaWordInfoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        voaUserInfoDaoConfig = daoConfigMap.get(VoaUserInfoDao.class).clone();
        voaUserInfoDaoConfig.initIdentityScope(type);

        voaWordInfoDaoConfig = daoConfigMap.get(VoaWordInfoDao.class).clone();
        voaWordInfoDaoConfig.initIdentityScope(type);

        voaUserInfoDao = new VoaUserInfoDao(voaUserInfoDaoConfig, this);
        voaWordInfoDao = new VoaWordInfoDao(voaWordInfoDaoConfig, this);

        registerDao(VoaUserInfo.class, voaUserInfoDao);
        registerDao(VoaWordInfo.class, voaWordInfoDao);
    }
    
    public void clear() {
        voaUserInfoDaoConfig.clearIdentityScope();
        voaWordInfoDaoConfig.clearIdentityScope();
    }

    public VoaUserInfoDao getVoaUserInfoDao() {
        return voaUserInfoDao;
    }

    public VoaWordInfoDao getVoaWordInfoDao() {
        return voaWordInfoDao;
    }

}
